﻿using System;
using Microsoft.SharePoint;
using NUnit.Framework;

namespace UnitTest
{    
    public class ReadTest
    {
        [TestFixtureSetUp]
        public void Init()
        {
            this.site = new SPSite("http://xchai1");
            this.web = site.OpenWeb();
            this.calendar = web.GetList("/Lists/Calendar");
        }

        [TestFixtureTearDown]
        public void Cleanup()
        {
            this.web.Dispose();
            this.site.Dispose();
        }

        SPSite site;
        SPWeb web;
        SPList calendar;

        [Test]
        public void ReadSimpleEvent()
        {
            var item = this.calendar.GetItemById(4);
            var evt = WindStyle.SPCalendar.Utility.ParseEvent(item);
            Assert.AreEqual(1, 1);
        }
    }
}
